<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>本地注册</title>

</head>
<body>
  <div id="div1">
    <model11></model11>
  </div>
  <hr/>
<!--  <div id="div2">-->
<!--    <model11></model11>-->
<!--  </div>-->
</body>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <script>
    new Vue({
      el: "#div1",
      components: {
        "model11":{
          template:"<div><h1>{{title}}</h1><button type='button' @click='btn'>点我</button></div>",
          data: function (){
            return{
              title: "hello"
            }
          },
          methods:{
            btn:function (){
              alert("hello!!!")
            }
          }
        }
      }
    });
    // new Vue({
    //   el: "#div2"
    // });
  </script>
</html>